//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date: 2021/07/07 15:05:54
// Design Name: 
// Module Name: sll_shifter
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//////////////////////////////////////////////////////////////////////////////////


module sll_shifter(
    input [31:0] Adata,
    input [31:0] Bdata,
    output reg  [31:0] sll_result
    );
    
    
always @(*)    
begin
        case(Bdata[4:0])
            'd0:sll_result=Adata;
            'd1:sll_result={Adata[30:0],1'b0};
            'd2:sll_result={Adata[29:0],2'b00};
            'd3:sll_result={Adata[28:0],3'b000};
            'd4:sll_result={Adata[27:0],4'b0000};
            'd5:sll_result={Adata[26:0],5'b00000};
            'd6:sll_result={Adata[25:0],6'b000000};
            'd7:sll_result={Adata[24:0],7'b0000000};
            'd8:sll_result={Adata[23:0],8'b00000000};
            'd9:sll_result={Adata[22:0],9'b000000000};
            'd10:sll_result={Adata[21:0],10'b0000000000};
            'd11:sll_result={Adata[20:0],11'b00000000000};
            'd12:sll_result={Adata[19:0],12'b000000000000};
            'd13:sll_result={Adata[18:0],13'b0000000000000};
            'd14:sll_result={Adata[17:0],14'b00000000000000};
            'd15:sll_result={Adata[16:0],15'b000000000000000};
            'd16:sll_result={Adata[15:0],16'b0000000000000000};
            'd17:sll_result={Adata[14:0],17'b0000_0000_0000_00000};
            'd18:sll_result={Adata[13:0],18'b0000_0000_0000_0000_00};
            'd19:sll_result={Adata[12:0],19'b0000_0000_0000_0000_000};
            'd20:sll_result={Adata[11:0],20'b0000_0000_0000_0000_0000};
            'd21:sll_result={Adata[10:0],21'b0000_0000_0000_0000_0000_0};
            'd22:sll_result={Adata[9:0],22'b0000_0000_0000_0000_0000_00};
            'd23:sll_result={Adata[8:0],23'b0000_0000_0000_0000_0000_000};
            'd24:sll_result={Adata[7:0],24'b0000_0000_0000_0000_0000_0000};
            'd25:sll_result={Adata[6:0],25'b0000_0000_0000_0000_0000_0000_0};
            'd26:sll_result={Adata[5:0],26'b0000_0000_0000_0000_0000_0000_00};
            'd27:sll_result={Adata[4:0],27'b0000_0000_0000_0000_0000_0000_000};
            'd28:sll_result={Adata[3:0],28'b0000_0000_0000_0000_0000_0000_0000};
            'd29:sll_result={Adata[2:0],29'b0000_0000_0000_0000_0000_0000_0000_0};
            'd30:sll_result={Adata[1:0],30'b0000_0000_0000_0000_0000_0000_0000_00};
            'd31:sll_result={Adata[0],31'b0000_0000_0000_0000_0000_0000_0000_000};
            default:sll_result=Adata;
        endcase
    end
    
endmodule
